package com.itlong.cloud.smartcard.dao;


import com.itlong.cloud.POJO.DTO.smartcard.SmartCardSyncDataPullUserBasisInfoDTO;
import com.itlong.cloud.POJO.PO.AppUserInfoPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      一卡通_用户模块操作数据库接口。
 * <desc/>
 *
 * @createDate 2017/11/1.
 */
@Mapper
@Repository
public interface ISmartCardUserInfoDao {


    /**
    * <desc>
    *    根据查询条件（如手机号，邮箱）查询手机用户基本资料.
    * </desc>
    *
    * @param  params
    * @return xx
    * @author LewisLouis
    * @createDate 2018-01-04
    */
    List<AppUserInfoPO> getSmartCardAppUserInfo(Map<String, Object> params);

    /**
     * <desc>
     *     查询App用户项目基本信息-.
     * </desc>
     *
     * @param  projectId 项目Id
     * @param  userId 用户Id
     * @return 查询结果集
     * @author LewisLouis
     * @createDate 2017-12-22
     */
    List<SmartCardSyncDataPullUserBasisInfoDTO> getUserBasisInfo(@Param("projectId")String projectId, @Param("userId")String userId);

    /**
     * <desc>
     *      获取用户信息
     * </desc>
     *
     * @param uid
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/11/18
     */
    String getUserIdByUid(@Param("uid") String uid,@Param("projectId") String projectId);

    /**
     * <desc>
     *      查询通行记录id
     * </desc>
     *
     * @param uid
     * @param projectId
     * @param passTime
     * @return
     * @author Jiaqi.X
     * @createDate 2019/11/18
     */
    String getPassIdByQrcodeInfo(@Param("uid") String uid,@Param("projectId") String projectId,@Param("passTime") String passTime);

    /**
     * <desc>
     *     修改人脸识别系统下发人脸失败的信息.
     * </desc>
     *
     * @param  projectId 项目Id
     * @param  userId 用户Id
     * @return 查询结果集
     * @author Juguang.S
     * @createDate 2019-11-12
     */
    void updateAppUserProjectInfo(@Param("projectId")String projectId,@Param("faceFailDesc")String faceFailDesc, @Param("userId")String userId);
}
